home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clickx 115
/
Clickx 115.iso
/
software
/
tools
/
windows
/
tails-i386-0.16.iso
/
live
/
filesystem.squashfs
/
usr
/
share
/
pyshared
/
rdflib
/
StringInputSource.py
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Python Source
|
2009-03-04
|
456 b
|
16 lines
from urllib2 import urlopen, Request
from xml.sax.xmlreader import InputSource
from rdflib import __version__
from StringIO import StringIO
class StringInputSource(InputSource, object):
def __init__(self, value, system_id=None):
super(StringInputSource, self).__init__(system_id)
stream = StringIO(value)
self.setByteStream(stream)
# TODO:
# encoding = value.encoding
# self.setEncoding(encoding)